﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using KerriganDataContract;
using KerriganDataContract.DrivingMode;
using System.Diagnostics;

namespace KerriganService.DAC
{
    static public class DrivingModeDAC
    {
        static public TDrivingMode CopyBoToEntity(DrivingModeDC bo)
        {
            TDrivingMode entity = new TDrivingMode();

            try
            {
                entity.IdDrivingMode = bo.IdDrivingMode;
                entity.Name = bo.Name;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }

            return entity;
        }


        public static DrivingModeDC CopyEntityToBo(TDrivingMode entity)
        {
            DrivingModeDC bo = new DrivingModeDC();

            try
            {
                bo.IdDrivingMode = entity.IdDrivingMode;
                bo.Name = entity.Name;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }

            return bo;
        }
    }
}